package com.owg.jigsaw.slots;

import com.owg.jigsaw.WBlock;
import com.owg.jigsaw.hierarchy.TypeNode;

import owg.util.data.PField;
import owg.util.data.PFieldOptional;

public class SingleSlot extends Slot
{
	public final PFieldOptional<WBlock> child = new PFieldOptional<WBlock>(this, WBlock.class);
	/**
	 * Create a new single-slot. A single-slot allows at most one block to be connected.
	 * @param slotType The type of this slot. The slot will only accept tabs of this type, or tabs that have child types of this type.
	 */
	public SingleSlot(TypeNode slotType)
	{
		super(slotType, false);
	}

	@Override
	public PField<WBlock> getChildren()
	{
		return child;
	}
}
